home *** CD-ROM | disk | FTP | other *** search
/ PC Active 2009 July/August / PC Active NR.227.iso / Software / Games / windows / Freeciv-2.1.9-win32-gtk2-setup.exe / INSTALL < prev    next >
Encoding:
Text File  |  2009-03-25  |  25.7 KB  |  718 lines

  1. ===================
  2. Installing Freeciv:
  3. ===================
  4.  
  5. This file describes how to compile and install Freeciv. Last time we
  6. made sure this file is up to date was 16-Jul-06.
  7. Last minor update was 08-May-08.
  8.  
  9. There may be a localized version of this file in the ./doc directory,
  10. named INSTALL.<locale> (e.g., INSTALL.de).
  11.  
  12. This document contains sections and subsections as follows:
  13.      0. Prerequisites:
  14.      1. Prerequisites for the clients:
  15.           1a. Prerequisites for the Gtk+ client:
  16.           1b. Prerequisites for the SDL client:
  17.           1c. Prerequisites for the Xaw client:
  18.      2. Generating Makefiles
  19.           2a. Generating the Makefile for svn versions:
  20.           2b. Generating the Makefile for release versions:
  21.      3. Compiling Freeciv:
  22.      4. Installation:
  23.      5. Native Language Support:
  24.      6. Readline Support:
  25.      7. Reinier's Solaris Installation Notes:
  26.      8. Reinier's libXpm Solaris Installation Notes:
  27.      9. Mac OS X and Darwin notes:
  28.     10. Debian GNU/Linux notes:
  29.     11. Cygwin notes:
  30.     12. Win32 ("native MS Windows") notes:
  31.  
  32.  
  33. 0. Prerequisites:
  34. =================
  35.  
  36. Freeciv has a number of prerequisites.  Note, that apart from the first
  37. prerequisite, the Freeciv configuration process is smart enough to work
  38. out whether your system is suitable.  If in doubt, just try it.
  39.  
  40.  - Unix (or similar)
  41.  
  42.    The Unix operating system, a work-alike such as Linux or FreeBSD,
  43.    or some OS that provides a very Unix-like personality or mode, like
  44.    EMX under OS/2 or the Cygnus Cygwin toolkit under Windows.
  45.    (See http://sourceware.cygnus.com/cygwin/).  Support for
  46.    BSD-style TCP/IP sockets is essential, as is a Bourne-shell
  47.    compatible shell, such as GNU "bash".  (Most Unixes fit the bill...)
  48.  
  49.  - An ANSI C compiler.
  50.  
  51.    Freeciv is written in very portable (almost) ANSI C.  Both 32- and 64-
  52.    bit machines are supported.  You cannot use a "K&R C" compiler, or
  53.    a C++ compiler.
  54.  
  55.    Development of Freeciv is primarily done with "gcc", the GNU
  56.    project's excellent C compiler.  Releases can be compiled with gcc
  57.    or most other compilers (such as the unbundled Solaris C compiler).
  58.    Development releases and svn snapshots will not work without gcc,
  59.    unless you give configure the "--disable-auto-deps" option.  See
  60.    the section below for more information.
  61.    Note that there have been reports that gcc with -O3 miscompiled
  62.    freeciv.
  63.  
  64.  - A "make" program.
  65.  
  66.    Freeciv developers generally use "gmake", the GNU make program.
  67.  
  68.    Officially released versions of Freeciv are designed to have
  69.    makefiles which work with most make programs.  Development releases
  70.    and svn snapshots contain things (like dependencies) which use
  71.    gmake's enhanced features, so gmake is necessary for development,
  72.    unless you give configure the "--disable-auto-deps" option.  See the
  73.    section below for more information.
  74.  
  75.    You can check if you have GNU make installed on your system by
  76.    typing:
  77.  
  78.     % make -v                   [and if this doesn't work, try "gmake -v"]
  79.  
  80.    The output should include "GNU Make" somewhere.
  81.  
  82. The svn version has additional requirements. A release version
  83. contains the generated files.
  84.  
  85.  - The programs from GNU gettext version 0.10.36 or better
  86.  
  87.    Especial the xgettext program is required to create the *.gmo
  88.    files which aren't included in the svn tree.
  89.  
  90.  - GNU autoconf version 2.55 or better
  91.  
  92.    Autoconf is required to create configure from configure.ac.
  93.  
  94.  - GNU automake version 1.6 or better
  95.  
  96.    Automake is required to create the various Makefile.in from
  97.    Makefile.am.
  98.  
  99. 1. Prerequisites for the clients:
  100. =================================
  101.  
  102. The Freeciv client comes in the following forms:
  103. * Gtk+ 2.0 widget library ("Gtk+ 2.0").
  104. * AmigaOS MUI ("Mui").
  105. * Native Microsoft Windows Common Controls ("Win32").
  106. * X Athena Widgets library ("Xaw").
  107.  
  108. These forms have different prerequisites, explained separately below.
  109.  
  110. Your system will need to satisfy at least one of these sets of prerequisites.
  111.  
  112. Note that most Linux systems have separate library packages for "runtime" 
  113. library support and for development support (for compiling programs 
  114. which use those libraries).  To compile Freeciv on such systems you 
  115. will need to have the appropriate "development" packages installed.
  116.  
  117.  
  118. 1a. Prerequisites for the Gtk+ 2.0 client:
  119. ==========================================
  120.  
  121.  - "pkg-config".
  122.  
  123.    "pkg-config" is a system for managing library compile/link flags that
  124.    works with automake and autoconf. You may obtain it at:
  125.  
  126.       ftp://ftp.gtk.org/pub/gtk/v2.0/dependencies/pkgconfig-0.14.0.tar.gz
  127.  
  128.  - The "Glib" utility library.
  129.  
  130.    The "Glib" utility library provides non-graphical functions used by the
  131.    "Gdk" and "Gtk+" libraries, like hash tables, single linked lists, etc.
  132.  
  133.    Freeciv requires a version of "Glib" greater or equal to 2.4.0.
  134.  
  135.    If the Freeciv configure process tells you that you don't have the
  136.    Glib library installed, then it may be obtained from here:
  137.  
  138.      ftp://ftp.gtk.org/pub/gtk/v2.4/glib-2.4.8.tar.bz2
  139.  
  140.  - The "Atk" accessibility library.
  141.  
  142.    The "Atk" library provides a set of interfaces for accessibility.
  143.    It allows people with disabilities to utilize all the functionality
  144.    provided by Gtk+ apps. You may obtain it at:
  145.  
  146.      ftp://ftp.gtk.org/pub/gtk/v2.4/atk-1.8.0.tar.bz2
  147.  
  148.  - The "Pango" text layout and rendering library.
  149.  
  150.    "Pango" is library for layout and rendering of text, with an emphasis
  151.    on internationalization. You may obtain it at:
  152.  
  153.      ftp://ftp.gtk.org/pub/gtk/v2.4/pango-1.4.1.tar.bz2
  154.  
  155.  - The "Gtk+" widget library.
  156.  
  157.    The "Gtk+" widget library was designed for the GIMP graphics program.
  158.    Since then it has gained popularity as an easy to program, free toolkit.
  159.  
  160.    "Gtk+" is the default client. If you don't specify any client with
  161.    "--enablie-client" to configure, you will get "Gtk+" client.
  162.  
  163.    The "Gtk+" library comes with two companion libraries:
  164.  
  165.      "Gdk":
  166.        Provides an abstraction layer over X-Windows/LinuxFB/Win32 to implement
  167.        basic drawing functions, windows, clipping, etc.
  168.  
  169.      "GdkPixbuf":
  170.        Provides image loading/saving facilities.
  171.  
  172.    Freeciv requires a version of "Gtk+" greater or equal to 2.4.0.
  173.  
  174.    If the Freeciv configure process tells you that you don't have the
  175.    Gtk+ library installed, then it may be obtained from here:
  176.  
  177.      ftp://ftp.gtk.org/pub/gtk/v2.4/gtk+-2.4.14.tar.bz2
  178.  
  179.    "Gtk+" depends on the "Glib", "Atk" and "Pango" libraries.
  180.  
  181. If you are going to make these yourself, build and install them in the
  182. following order: pkg-config, Glib, Atk, Pango, Gtk+.
  183.  
  184. 1b. Prerequisites for the SDL client:
  185. =====================================
  186.  
  187.  - The "SDL" library.
  188.  
  189.    "Simple DirectMedia Layer is a cross-platform multimedia library designed
  190.     to provide low level access to audio, keyboard, mouse, joystick, 3D hardware
  191.     via OpenGL, and 2D video framebuffer." (http://www.libsdl.org)
  192.     
  193.    These features make it a good choice for portable games. You may obtain it
  194.    at:
  195.     
  196.    http://www.libsdl.org/release/SDL-1.2.11.tar.gz
  197.  
  198.    To compile the client using the "SDL" library add "--enable-client=sdl"
  199.    to the Freeciv configure script.  See the section below for more 
  200.    information about the configure script.
  201.     
  202.  - The "SDL_image" library.
  203.  
  204.    This library loads the PNG images (with the help of libpng) and converts
  205.    them to "SDL surfaces" that can be handled by the "SDL" library. You may
  206.    obtain it at:
  207.    
  208.    http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.5.tar.gz
  209.    
  210.  - The "freetype" library.
  211.  
  212.    This library helps to render text for the SDL client, using an externally
  213.    provided TrueType font. You may obtain it at:
  214.    
  215.    http://download.savannah.gnu.org/releases/freetype/freetype-2.3.2.tar.gz
  216.    
  217.  
  218. 1c. Prerequisites for the Xaw client:
  219. =====================================
  220.  
  221.  - X-Windows.
  222.  
  223.    The Freeciv Xaw client is an X-Windows program, so you'll need 
  224.    some way of running X-Windows programs.  (Most Unixes can...)
  225.  
  226.    If the Freeciv configuration program can't find X Windows on
  227.    your system, you may need to use the --x-includes=DIR
  228.    and --x-libraries=DIR options.
  229.  
  230.  - The "Athena" widget library.
  231.  
  232.    This library (also known as "Xaw") is usually supplied standard
  233.    with the rest of X Windows, but some platforms (HP-UX 10 for
  234.    example) only provide it in a limited form.
  235.  
  236.    To compile the client using the "Xaw" library add "--enable-client=xaw"
  237.    to the Freeciv configure script.  See the section below for more 
  238.    information about the configure script.
  239.  
  240.    Many modern Unix systems (such as Linux) ship with a variant called
  241.    "Xaw3d", which has a more modern "3D" look.  If you'd like to try
  242.    compiling with Xaw3d, then add "--with-xaw3d" to the Freeciv
  243.    configure script.
  244.  
  245.    There are also other variants of Xaw, such as Nextaw.  Freeciv
  246.    does not work with these, although it should be possible to modify
  247.    it in the same fashion as for Xaw3d.  Another tool which may help
  248.    is called "xaw_wrappers", although how to use it is beyond the
  249.    scope of this file.
  250.  
  251.  - The "Xpm" library.
  252.  
  253.    This library is essential for icon and bitmap handling.  It is in
  254.    wide use, and is supplied standard on most modern Unix machines,
  255.    although it may be missing on traditional or older Unixes, eg,
  256.    Solaris.
  257.  
  258.    When you run the Freeciv configure script, it may be necessary for
  259.    you to use the "--with-xpm-prefix=DIR" command-line option, where
  260.    DIR is the name of the directory containing the "include" and "lib"
  261.    subdirectories where Xpm may be found.
  262.  
  263.    If the Freeciv configure process tells you that you don't have the
  264.    Xpm library installed, then it may be obtained from here:
  265.  
  266.      ftp://koala.inria.fr/pub/xpm/xpm-3.4k.tar.gz
  267.      ftp://ftp.x.org/contrib/libraries/xpm-3.4k.tar.gz
  268.  
  269.    Install it as you would any other package.  If you can't install
  270.    it in a standard system directory, then use the --with-xpm-prefix
  271.    option, as described above.
  272.  
  273.    If you have problems installing libXpm on Solaris, or don't want to
  274.    install it as root, see Reinier's libXpm Solaris Installation Notes
  275.    section near the end of this file.
  276.  
  277.  
  278. 2. Generating Makefiles
  279. =======================
  280. This section contains two parts, one for generating makefiles from svn
  281. versions and one for generating makefiles from release versions.
  282.  
  283. 2a. Generating the Makefile for svn versions:
  284. =============================================
  285.  
  286. This step is only needed for svn versions.
  287.  
  288. To create the makefile just type
  289.  
  290.  % ./autogen.sh
  291.  
  292. This will create the configure script and will run it. All parameters
  293. of autogen.sh are passed to configure. Read the next section about the
  294. parameters which can be passed to configure.
  295.  
  296. 2b. Generating the Makefile for release versions:
  297. =================================================
  298.  
  299. Before you compile Freeciv, you must generate a Makefile.  This makefile
  300. is configured to suit the features available on your machine.
  301.  
  302. This configuration is done using the GNU "configure" script.
  303.  
  304. To use "configure", "cd" into the top directory containing the Freeciv
  305. files, and type:
  306.  
  307.  % ./configure
  308.  
  309. This script will then attempt to determine the relevant features (and
  310. misfeatures!!) of your system.  It should print a page or two of
  311. diagnostics about your machine, then stop gracefully.
  312.  
  313. If you'd like help on the various options supported by the configure
  314. script, try the --help option, like this:
  315.  
  316.  % ./configure --help
  317.  
  318. If you're compiling a development release or a svn snapshot, and you
  319. don't have both GNU make AND gcc, then pass configure the
  320. "--disable-auto-deps" option.  You'll especially need to do this if
  321. you're using the Solaris cc and make programs.
  322.  
  323. Note that if you do this, dependency checking is disabled.  If you
  324. change any Freeciv .h files after this for any reason, you should do
  325. a "make clean" before doing "make" to ensure everything is compiled
  326. correctly.
  327.  
  328. "--disable-auto-deps" has no effect when run with a stable release.
  329.  
  330. By default the configure script will choose the Gtk+ client if the 
  331. required libraries are found. If you prefer to override this default,
  332. you can give configure the "--enable-client=xaw" option.
  333.  
  334. If you want to change the compiler options, set the CFLAGS environment
  335. variable in your shell before running "configure".  For example:
  336.  
  337.  % CFLAGS="-O -g -pipe" ./configure   [for people using Bourne shell or bash]
  338.  
  339. or
  340.  
  341.  % setenv CFLAGS "-O -g -pipe"
  342.  % ./configure                        [for people using C shell or tcsh]
  343.  
  344. If you're tracking down a "core dump", we suggest that you use
  345. a value of "-g" for CFLAGS.
  346.  
  347. When you install Freeciv (later), the game components will be copied into
  348. subdirectories of /usr/local by default.  If you would like to use some
  349. other installation prefix besides /usr/local, you should specify it now:
  350.  
  351.  % ./configure --prefix=/opt/freeciv
  352.  
  353. If for some reason using "configure" gives you trouble, follow these steps:
  354.  
  355.   - Read the prerequisites section carefully, to determine if your
  356.     system meets all the requirements.
  357.  
  358.   - If you are compiling the Xaw version of the client: Ensure that
  359.     you have both the Xpm and Xaw libraries installed on your system.
  360.     Make sure that the configure script can find them, either by
  361.     installing them in the standard places on your system, or by
  362.     instructing the configure script with the appropriate command-line
  363.     options.  (See ./configure --help).
  364.  
  365.   - If the problem is with "gettext", please read the Native Language
  366.     Support section, below, for possible work-arounds.
  367.  
  368.   - Let us know, so that we can fix it for the next release!!
  369.  
  370.     Send mail to the freeciv-dev mailing list, telling us what you did,
  371.     and what the result is.  It would be helpful to include the output
  372.     of the configure script, and the contents of the "config.status",
  373.     "config.cache" and "config.log" files, which are generated by the
  374.     configure script.
  375.  
  376.     You can find out about the freeciv-dev mailing list on our web
  377.     site, at http://www.freeciv.org/
  378.  
  379.  
  380. 3. Compiling Freeciv:
  381. =====================
  382.  
  383. If all has gone well previous to this point, then compiling Freeciv
  384. should be as easy as typing "make" (or preferably, "gmake").
  385.  
  386. If you have problems, read the file BUGS, and follow the advice 
  387. carefully.  If the problem is with "gettext", please read the Native
  388. Language Support section, below, for possible work-arounds.
  389.  
  390. After compilation, the important results are:
  391.  
  392.   - The "client/civclient" and "server/civserver" binaries.
  393.   - The "data/" directory, which contains the graphics and scenarios.
  394.   - The "po/" directory, which contains the localization files.
  395.   - The "civ" and "ser" scripts.
  396.  
  397. It's perfectly feasible to play Freeciv in this directory, without
  398. installing it.  If you do this, the "civ" and "ser" scripts may be
  399. useful, although they are not as necessary as they used to be.
  400.  
  401. See the README file for more information.
  402.  
  403. (However you cannot use Internationalization when playing Freeciv from
  404. the source directory; you must install Freeciv for that.)
  405.  
  406.  
  407. 4. Installation:
  408. ================
  409.  
  410. Installing Freeciv involves installing the components mentioned in the
  411. Compiling Freeciv section.  These need to be copied to a directory such
  412. as /usr/local (the default), /usr/games, /usr/games/freeciv,
  413. /usr/local/freeciv, or some other suitable directory.
  414.  
  415. Typing "make install" should install everything correctly on your machine.
  416. You may like to use the --prefix=DIR configure option (see the Generating
  417. the Makefile section) to ensure the files get placed where you want.
  418.  
  419. When the Freeciv client and Freeciv server are run they both need to 
  420. find some files from the "data" directory.  By default freeciv looks
  421. in the following directories, in order, for any data files: the current 
  422. directory; the "data" subdirectory of the current directory; the 
  423. subdirectory ".freeciv" in the user's home directory; and the directory
  424. where the files are placed by running "make install".  You can override
  425. this search patch by setting the FREECIV_PATH environment variable, to
  426. a single directory or a list of directories separated by colons.
  427.  
  428. For example:
  429.  
  430.   % setenv FREECIV_PATH "/usr/games/freeciv/data:./data"
  431.   (for users of csh, tcsh, etc.)
  432.  
  433.   % FREECIV_PATH="/usr/games/freeciv/data:./data"; export FREECIV_PATH
  434.   (for users of sh, bash, ksh, zsh, etc.)
  435.  
  436. Also, note that you generally must install Freeciv if you wish to use
  437. its Native Language Support.  See the README file for more information.
  438.  
  439. Finally, if you've chosen to use the Xaw client and you have permission
  440. to log in as the 'root' user, you should consider copying the resource
  441. file data/Freeciv into your app-defaults directory. (Usually this is
  442. /usr/lib/X11/app-defaults).
  443.  
  444.  
  445. 5. Native Language Support:
  446. ===========================
  447.  
  448. Freeciv uses the "gettext" system for Native Language Support.
  449.  
  450. If you experience problems with gettext in either configuring or compiling
  451. Freeciv, there are a few work-arounds you can try:
  452.  
  453. 1. If you don't need Native Language Support, disable it using the
  454.    "--disable-nls" ./configure option:
  455.  
  456.       % ./configure --disable-nls
  457.       % make
  458.  
  459. 2. If you want Native Language Support, try the version of gettext that
  460.    is included with Freeciv by specifying the "--with-included-gettext"
  461.    ./configure option:
  462.  
  463.       % ./configure --with-included-gettext
  464.       % make
  465.  
  466. 3. Finally, you can try to install the latest version of GNU gettext.
  467.    It may be obtained from here:
  468.  
  469.       ftp://ftp.gnu.org/pub/gnu/gettext/gettext-0.14.6.tar.gz
  470.  
  471.  
  472. 6. Readline Support:
  473. ====================
  474.  
  475. Freeciv has optional support for the readline library.
  476.  
  477. Readline support is what makes the server command line behave sensibly,
  478. making it possible to
  479.  - Use the backspace key.
  480.  - Use the cursor to move back and forth on the line you have written.
  481.  - Use TAB completion of commands and command arguments. Ie, when you
  482.    push tab the server will finish the word for you if there is only one
  483.    possible choice.
  484.  - Use the up and down cursor to scroll through the history of previously
  485.    entered commands.
  486.  - etc.
  487.  
  488. The configure script will check if you have the readline library correctly
  489. installed. If so it will automatically set up the makefiles so that readline
  490. is compiled into the server. If not then it will just silently configure
  491. without readline support.
  492. You can force configure to include readline or die trying by giving
  493. configure the --with-readline option:
  494.  
  495.  % ./configure --with-readline
  496.  
  497. Some linux distributions (and possibly other operating systems) have
  498. readline version 4 incorrectly installed, so that readline is not
  499. set up to declare it's dynamic dependencies. In that case configure
  500. will try to guess which extra libs it should link against and add them.
  501. The configure script will give a warning if it had to add extra libs
  502. to make readline work. This should be harmless, and is just meant as
  503. a reminder to the folks who distribute readline. :)
  504.  
  505. 7. Reinier's Solaris Installation Notes:
  506. ========================================
  507.  
  508. Solaris (2.5 and up) has its own version of X in /usr/openwin, its own
  509. version of make in /usr/ccs/bin/make, and its own compiler (to be purchased
  510. separately) which, if you have it, is available in /opt/SUNWspro/bin.
  511. Solaris does not provide the XPM library, which is required for the Xaw
  512. client; it doesn't provide any of the stuff required for imlib, gdk and gtk,
  513. either, which is required to build the GTK+ client.  However, with some
  514. patience, everything can be compiled without problems.
  515.  
  516. For information on how to install XPM on Solaris, see the next section.
  517.  
  518. Many Solaris installations also have MIT X (usually, in /usr/X11), GNU make,
  519. the gcc compiler, and the XPM library installed somewhere.  The standard
  520. command "./configure && make" may not be able to find your XPM library and
  521. it is likely to confuse the different versions.
  522.  
  523. Make sure your environment variables, especially $PATH and $LD_LIBRARY_PATH,
  524. and the ./configure options do not point to an inconsistent set of software,
  525. and compiling will be fine.
  526.  
  527. A simple recipe to compile with Sun X, Sun make and Sun cc, assuming the xpm
  528. libraries are on their own in the nonstandard location /path/to/xpm:
  529.  
  530.   % setenv PATH /opt/SUNWspro/bin:/usr/ccs/bin:/bin
  531.   % unsetenv LD_LIBRARY_PATH
  532.   % ./configure --with-xpm-prefix=/path/to/xpm
  533.                 --disable-auto-deps --with-included-gettext
  534.   % make
  535.  
  536. The "--disable-auto-deps" prevents ./configure from creating Makefiles
  537. specific to GNU make.  The symptoms of this happening are:
  538.  
  539.   make: Fatal error in reader:
  540.         Makefile, line 214: = missing from replacement macro reference
  541.   make: Fatal error: Command failed for target `all-recursive'
  542.  
  543. Alternatively, you can set up your $PATH and ./configure to use only GNU
  544. tools.  Furthermore, Freeciv is known to compile with MIT X, and with
  545. certain combinations of GNU and Sun tools.  The exact recipes depend on your
  546. local installation.
  547.  
  548.  
  549. 8. Reinier's libXpm Solaris Installation Notes:
  550. ===============================================
  551.  
  552. When I was root on my Solaris system, I *still* didn't want to install
  553. third-party software as root.  It's bad practice.
  554.  
  555. Unfortunately, the libXpm installation procedure assumes installation
  556. in /usr/openwin, which is owned by root.  But it's not all that hard to
  557. get around that.
  558.  
  559. Caveats:
  560.  
  561.  - Make sure /usr/ucb/install is in your $PATH before /usr/bin/install,
  562.    otherwise 'make install' will break with strange error messages.
  563.  
  564.  - The destination you want to install to can be specified with $DESTDIR;
  565.    however, installation will actually take place in $DESTDIR/$OPENWINDIR,
  566.    so the additional $OPENWINDIR subdir must be stripped afterwards
  567.    (changing the value of $OPENWINHOME doesn't work).
  568.  
  569. The Procedure:
  570.  
  571.  - Get the source from somewhere, untar it, cd into the source directory,
  572.    and issue:
  573.  
  574.      % setenv MYXPMDEST /usr/local   # or wherever you want to install it
  575.      % xmkmf; make Makefiles includes depend; make
  576.      % setenv PATH /usr/local/bin:/usr/ucb:$PATH
  577.      % make DESTDIR=$MYXPMDEST install
  578.      % make DESTDIR=$MYXPMDEST install.man
  579.      % cd $MYXPMDEST; mv ./$OPENWINHOME/* .; rm -rf ./$OPENWINHOME
  580.  
  581.    (If you use sh, bash, ksh, zsh, etc., the "setenv"s above should be:
  582.      % MYXPMDEST=/usr/local; export MYXPMDEST
  583.      % PATH=/usr/local/bin:/usr/ucb:$PATH
  584.    .)
  585.  
  586.  - You can now configure Freeciv with
  587.  
  588.      % ./configure --with-xpm-prefix=$MYXPMDEST
  589.  
  590.    which will add the proper -I/-L/-R options to the compile and link
  591.    commands.
  592.  
  593.  
  594. 9. Mac OS X and Darwin notes:
  595. =============================
  596.  
  597. Apple's version of GCC uses precompiled headers that does not support
  598. vararg macros (a GCC extension).  This causes GCC to fail when
  599. compiling Freeciv since the compiler is otherwise (mostly)
  600. indistinguishable from vanilla GCC.  So instead of the usual
  601.  
  602.   % ./configure <...>
  603.  
  604. you should use either
  605.  
  606.  Bourne shell:
  607.    $ CC="gcc -no-cpp-precomp" ./configure <...>
  608.  
  609. or
  610.  
  611.  C shell:
  612.    % env CC="gcc -no-cpp-precomp" ./configure <...>
  613.  
  614. depending on whether your shell is a Bourne or C shell variant.  (If
  615. in doubt, just try both to see which one will work.)
  616.  
  617. Replace <...> with whatever additional arguments you want to give to
  618. configure.
  619.  
  620.  
  621. 10. Debian GNU/Linux notes:
  622. ===========================
  623.  
  624. To compile freeciv on a debian system you need the following packages:
  625.  
  626.  Common requirements:
  627.    gcc
  628.    libc6-dev
  629.    libreadline4-dev
  630.    zlib1g-dev
  631.    xlib6g-dev
  632.  
  633.  For the xaw client:
  634.    xaw3dg-dev
  635.    libxpm4-dev
  636.  
  637. If you want to compile the xaw client you should give configure the
  638. argument --with-xaw3d, ie
  639.  
  640.   % ./configure --with-xaw3d
  641.  
  642. If you need to run aclocal (if you don't know what aclocal is then you
  643. don't need it) you also need to install imlib-dev to get the
  644. AM_PATH_GDK_IMLIB macro. It is a bug in debian that this macro isn't
  645. in gdk-imlib-dev, and it will hopefully be fixed in future debian
  646. releases.
  647.  
  648. 11. Cygwin notes:
  649. =================
  650.  
  651. Cygwin specific installation notes can be found in doc/INSTALL-Cygwin.
  652.  
  653.  
  654. 12. Win32 ("native MS Windows") notes:
  655. ======================================
  656. Requirements: a unix environment with gcc and binutils for windows (mingw32)
  657.               for the native win32 client: libz and libpng
  658.               (from ftp://ftp.freeciv.org/pub/freeciv/requirements)
  659. You can use the standard gcc makefiles for them, but set CC and RANLIB to the
  660. right thing. If you use the libpng/libz binary shipped with cygwin, you are
  661. asking for trouble. 
  662. To compile the zlib from ftp.freeciv.org enter
  663. with the cygwin utils: make CC="gcc -mno-cygwin"
  664. with a mingw32 cross compiler: 
  665. make CC=iX86-mingw32-gcc RANLIB=iX86-mingw32-ranlib
  666.  
  667. To compile libpng from ftp.freeciv.org enter
  668. with the cygwin utils: 
  669. make -f scripts/makefile.gcc CC="gcc -mno-cygwin"
  670. with a mingw32 cross compiler:
  671. make -f scripts/makefile.gcc CC=i386-mingw32-gcc RANLIB=i386-mingw32-ranlib
  672.  
  673. These things have to be put to a place where your compiler will find it.
  674.  
  675. Autoconf and co:
  676. If you build from svn, you will have to replace ./configure with ./autogen.sh 
  677. in the following lines.
  678.  
  679. Configuring the source:
  680. -----------------------
  681. 1. with the cygwin utils:
  682. You need the mingw and the w32api package. 
  683.  
  684. export CC="gcc -mno-cygwin"
  685. ./configure --with-included-gettext --prefix=.
  686.  
  687. 2. cross compiling from a real unix.
  688. replace X with a number which you have chosen when you have configured your 
  689. cross compiler.
  690.  
  691. export CC=iX86-mingw32-gcc
  692. export AR=iX86-mingw32-ar
  693. export RANLIB=iX86-mingw32-ranlib
  694. ./configure --host=iX86-mingw32 --build=$(./config.guess) --with-included-gettext --enable-client=win32 --prefix=.
  695.  
  696.  
  697. Build and install:
  698. --------------------
  699. make
  700. make DESTDIR=absolute_install_path bindir=./ install
  701.  
  702. absolute_install_path must be  the path where you want to install freeciv.
  703. It must be absolute and must end with a slash.
  704.  
  705. Now it is time to cleanup the stuff a bit.
  706. cd into your install dir. Then check if the executables have the .exe suffix and if you want, strip them.
  707. I suggest to move the data dir:
  708.  
  709. mv share/freeciv data
  710.  
  711. The final step is to convert the gfx to png. Use your favorite gfx program in
  712. order to do that. You can use a combination of ImageMagick and pngquant for
  713. that.  But it is really important that you check the result. Check every file.
  714. The alpha channel (transparency)  often magically disappears. There is no 
  715. reliable script for that.
  716.  
  717. ** END **
  718.